-
Notifications
You must be signed in to change notification settings - Fork 3.4k
In STRICT mode, only define assert
when ASSERTIONS is set
#20592
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
75aaf0b
to
ad52571
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we not have any assertions outside of ifdef ASSERTIONS
? That is, ones we want to be checked even in release builds?
Not that I know of. If we do, perhaps we should give it a different name and make is as small as possible. |
It looks like that tests found at least one instance.. and we have one more being fixes in: #20504 |
Also, if we did have such code it would already not be usable under MINIMAL_RUNTIME. |
I see, this makes sense to me then. I wonder if we can minimize the risk to users, though? Atm, if user JS code uses One option is to leave |
But this only effects users who have opt'd into STRICT mode, and that set of users will likely know to look at the ChangeLog if they see and error like this on upgrade. |
026f9e6
to
54b933f
Compare
I should add that one of my motivations to landing this is to increase parity with MINIMAL_RUNTIME.. we need to ensure that our internal |
Ah, you're right. For STRICT mode this definitely makes sense. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm % comments
54b933f
to
1ee4488
Compare
This matches the behaviour of MINIMAL_RUNTIME, and supports the practice of not including asserts in release builds. Also remove the closure externs for `assert` so that closure can correctly error out end `assert` is not defined. Helps with emscripten-core#20504
1ee4488
to
31e6d0a
Compare
As of emscripten-core#20592, `assert` is no longer defined in release builds but its still possible to use SAFE_HEAP IN release builds. Instead of complicating the definition of `assert` to match `preamble_minimal.js` this change instead removed the dependency of SAFE_HEAP on the assert function. This fixes the `core2s.test_module_wasm_memory` which is currently failing on the emscripten-releases tree.
As of emscripten-core#20592, `assert` is no longer defined in release builds in STRICT mode, but its still possible to use SAFE_HEAP in this configuration. Instead of complicating the definition of `assert` to match `preamble_minimal.js` this change instead removed the dependency of SAFE_HEAP on the assert function. This fixes the `core2s.test_module_wasm_memory` which is currently failing on the emscripten-releases tree.
As of #20592, `assert` is no longer defined in release builds in STRICT mode, but its still possible to use SAFE_HEAP in this configuration. Instead of complicating the definition of `assert` to match `preamble_minimal.js` this change instead removed the dependency of SAFE_HEAP on the assert function. This fixes the `core2s.test_module_wasm_memory` which is currently failing on the emscripten-releases tree.
This seems to have broken WebIDL bindings when using STRICT mode. It tries to call e.g. emscripten/tools/webidl_binder.py Line 207 in edc1a75
|
This can happen when ASSERTIONS is not set and we are in STRICT mode or MINIMAL_RUNTIME mode. See emscripten-core#20592
|
This can happen when ASSERTIONS is not set and we are in STRICT mode or MINIMAL_RUNTIME mode. See emscripten-core#20592
This can happen when ASSERTIONS is not set and we are in STRICT mode or MINIMAL_RUNTIME mode. See emscripten-core#20592
This matches the behaviour of
MINIMAL_RUNTIME
, and supports the practiceof not including asserts in release builds.
Also remove the closure externs for
assert
so that closure cancorrectly error out end
assert
is not defined.Helps with #20504